export default {
  data() {
    return {
      pagelistLoading: true,
      dialogModelVisible: false,
      loading: false,
      list: [],
      total: 0,
      totalParams: { skipcount: 1, maxresultcount: 50 },
      tabStatus: {},
      fullRes: {}
    }
  },
  created() {
    if (this.httpUrl) this.httpGetListActions()
  },
  methods: {
    httpGetListActions() {
      this.pagelistLoading = true
      this.api[this.httpUrl]({ ...this.queryParams })
        .then(res => {
          console.log(333333)
          this.list = res.response
          this.tabStatus = res.tabStatus ? res.tabStatus : {}
        })
        .finally(() => {
          this.pagelistLoading = false
        })
    },
    searchHandle() {
      this.totalParams.skipcount = 1
      this.httpGetListActions()
    },
    changecurrent(val) {
      this.totalParams.skipcount = val
      this.httpGetListActions()
    },
    changePagination(maxresultcount) {
      // console.log(4444)
      this.totalParams.skipcount = 1
      this.totalParams.maxresultcount = maxresultcount
      // console.log(this.totalParams)
      this.httpGetListActions()
    },
    resetQueryParams() {
      this.setQueryParams({})
      this.httpGetListActions()
    },
    cancelFormAction() {
      this.dialogModelVisible = false
    }
  }
}
